<?php
$tm = $_GET['tm'];
$tm1 ='%';
$tm2 =$tm1.$tm.$tm1;
include("database.php");
$sql = "SELECT * FROM main WHERE csm LIKE '".$tm2."' ";
$res=$conn->query($sql);
$data=$res->fetch_all();
echo json_encode($data);
$conn->close();
?>